-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Fixed issue where esp32 won't reconnect to WiFi AP if the AP was restarted. #7512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed issue where esp32 won't reconnect to WiFi AP if the AP was restarted. #7512
Conversation
Hi @sanketwadekar I have retest this issue and when I turn Hotspot on my phone OFF, the reason for disconnecting is |
Some users(Rainmaker) have reported that their device won't reconnect and the reason in their case was UNSPECIFIED, and I too was able to reproduce this. Would keeping this change cause issues for other users? |
I will discuss it with colleagues. I am not sure, if there can be any other reasons marked as "UNSPECIFIED", where we should not do auto-reconnect. |
@me-no-dev and @pedrominatel we have discussed this PR a bit during today's meeting and we were not sure about proposed fix. Can you please help with review? Thanks. |
Adding the This fix could be acceptable but more investigation can be done to be sure that this fix will work in most cases. Is there any other reason that could be considered to be a reconnectable reason in the wifi_err_reason_t? |
Hi guys, I've changed the approach to the ESP-IDF recommendation. PTAL @sanketwadekar and @me-no-dev at my proposal. Now the reconnection should be done always except if the disconnection was done by the user. |
Description of Change
In the WiFi Provisioning example, the esp32 won't reconnect to the AP if the AP lost power and was restarted at some later point.
Tests scenarios
I have tested this using WiFiProv example on ESP32.
I connected the ESP32 to Mobile Hotspot and turned the Hotspot OFF/ON multiple times.
Related links
Closes espressif/esp-rainmaker#194
Co-authored-by: Pedro Minatel [email protected]